package com.h5lib.nchuoffice;

import java.util.HashMap;
import java.util.Map;

import com.h5lib.nchuoffice.constants.SysConstant;

/**
 * 登录的数据封装
 * @author farmer
 *
 */
public class ConnectDataFactory {
	
	private ConnectDataFactory(){
		
	}
	/**
	 * 创建登录
	 * @param username
	 * @param password
	 * @return
	 */
	public static Map<String, String> createLoginData(String username,String password){
		Map<String, String> data = new HashMap<String, String>();
		data.put("__VIEWSTATE", "dDwxNjY4ODI5NjgzO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47bDx0PHA8cDxsPEJhY2tJbWFnZVVybDs+O2w8aW1hZ2VzL3cxLmdpZjs+Pjs+O2w8aTwxPjs+O2w8dDxwPHA8bDxUZXh0Oz47bDzniYjmnKw6My40LjkxMjI1ODMuNC45MTIyNTg7Pj47cDxsPHN0eWxlOz47bDxwYWRkaW5nLXJpZ2h0OjEwXDs7Pj4+Ozs+Oz4+Oz4+Oz4+O2w8cm9sZTE7cm9sZTI7cm9sZTI7cm9sZTU7cm9sZTU7cm9sZTY7cm9sZTY7cm9sZTQ7cm9sZTQ7cm9sZTc7cm9sZTc7Pj48qkcfQA0KdcaxzcZeX7+Cppgomg==");
		data.put("role", SysConstant.ROLES[0]);
		data.put("Username", username);
		data.put("Password", password);
		return data;
	}

	/**
	 * 创建通过班级查询课程
	 * @param _class
	 * @param institute
	 * @param year
	 * @param schoolTerm
	 * @param viewstate
	 * @return
	 */
	public static Map<String, String> createQueryCourseByClassData(String _class,String schoolTerm,String viewstate){
		Map<String, String> data = new HashMap<String, String>();
		data.put("__VIEWSTATE", viewstate);
		data.put("ImageButton1.x", "12");
		data.put("ImageButton1.y", "15");
		data.put("queryMode", "c");
		data.put("ddlClass", _class);
		data.put("YearDropDownList", schoolTerm);
		return data;
	}
	
}
